const { log } = require('console')

function Animal(name) {
  this.name = name
  this.bark = function () {
    console.log(this.name + '在叫。。。')
  }
}

function Dog(color) {
  this.color = color
  this.hunt = function () {
    console.log(color + '的' + this.name + '在捕猎。。。')
  }
}
Dog.prototype = new Animal('阿拉斯加雪橇犬')
let dog = new Dog('白色')
dog.bark()
dog.hunt()
console.log(dog)
